import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class LoginService {
  private login = 'http://localhost:3000/users/login';

  constructor(private http: HttpClient) {
  }

  public loginCheck(data) {
    return this.http.post(this.login, data, {
      headers: {
        'Content-Type': 'application/json; charset=utf-8'
      }
    });
  }
}
